set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "-fext-numeric-literals ${CMAKE_CXX_FLAGS}")

LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
    SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")

add_library(WKTParser SHARED ${CMAKE_CURRENT_SOURCE_DIR}/src/WKTParser.cpp)
target_link_libraries(WKTParser
        ${OPENCV_LIBS}
        ${BOOST_LIBS}
        )

message(STATUS "-------------------- ${OPENCV_INCLUDE_DIR}")
target_include_directories(WKTParser
        PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
        PUBLIC ${OPENCV_INCLUDE_DIR}
)

# Install libWKTParser.so
install(TARGETS WKTParser DESTINATION lib)


